home *** CD-ROM | disk | FTP | other *** search
/ Freelog 22 / freelog 22.iso / Prog / Djgpp / GPC2952B.ZIP / doc / gpc / docdemos / highdemo.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2001-02-09  |  436 b   |  15 lines

  1. program HighDemo;
  2. type
  3.   Colors = (Red, Green, Blue);
  4. var
  5.   Col: array [Colors] of (Love, Hope, Faithfulness);
  6.   Foo: Colors;
  7.   Bar: Integer;
  8.   Baz: String (123);
  9. begin
  10.   Foo := High (Col);              { yields Blue }
  11.   Bar := Ord (High (Col [Foo]));  { yields Ord (Faithfulness), i.e., 2 }
  12.   Bar := High (Integer);          { returns highest possible ``Integer'' }
  13.   Bar := High (Baz)               { returns 123 }
  14. end.
  15.